<template>
  <div>
    <div class="header">
      <div class="header-left" @click = "back()">
          <span class="iconfont icon-fanhui"></span>
      </div>
      <div class="header-title">
        城市选择
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'CityHeader',
    mounted(){

    },
    methods:{
      back(){
        this.$router.go(-1)
      }
    }
  }
  // 1rem = html font-size = 50px
  // 另外设计图如果是两倍放大图，我们的像素都要除以2
  // 如果是两倍图，把font-size设置为50px，这时用rem正好是设计图大小的0.01倍
  // flex:1可以让块自动撑开
</script>
<style lang="stylus" scoped>
  .header
    display: flex
    line-height: .86rem
    background: #00bcd4
    color: #fff
    position relative
    .header-left
      width: .64rem
      float: left
      text-align: center
      position absolute
  .header-title
    flex 1
    text-align center
    font-size 0.32rem
</style>
